package com.uzai.common.enums;

/**
 * @Auther: xiaoyuexl
 * @Date: 2021/8/28 18:31
 * @Description:
 */
public enum TakeBalStatusEnum {
    //0待处理 1处理中 2自动提现成功 3自动提现失败 4手动审核成功 5拒绝并返还 6拒绝并扣除 7待领取(微信红包-手机版) 8已领取(微信红包-手机版)
    TBS_PENDING(0,"待处理"),
    TBS_AUTO_TAKEBAL_FAIL(3,"待处理(自动提现失败)"),
    TBS_PROCESSING(1,"处理中"),
    TBS_AUTO_TAKEBAL_SUCCESS(2,"自动提现成功"),
    TBS_MANUAL_AUDIT_SUCCESS(4,"手动审核成功"),
    TBS_REFUSE_AND_RETURN(5,"拒绝并返还"),
    TBS_REFUSE_AND_DEC(6,"拒绝并扣除"),
    TBS_UNCLAIMED(7,"待领取"),
    TBS_RECEIVED(8,"已领取")
    ;

    private Integer value;
    private String desc;

    TakeBalStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static TakeBalStatusEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (TakeBalStatusEnum type: TakeBalStatusEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
